import BaseApi from '../BaseApi';

const controller = "/locus";

export default {

    getLocusTime() {
        return this.requestGet(controller, "/getLocusInterval");
    },
    getAllUser() {
        return this.requestGet(controller, "/getAllUser");
    },
    saveLocus(condition) {
        return this.requestPost(controller, "/saveLocus", condition);
    },
    getLocusAPI(condition) {
        return this.requestGet(controller, "/getLocusAPI", condition);
    },
    getLocus(condition) {
        return this.requestGet(controller, "/getLocusByUserId", condition);
    },

    // attendanceRecordExcel(condition) {
    //     return this.requestDownloadGet(controller, "/attendanceRecordExcel", condition);
    // },



    /*请求封装*/
    requestPost(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestPost(newUrl, condition);

    },
    requestGet(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestGet(newUrl, condition);
    },
    requestDownloadGet(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestDownloadGet(newUrl, condition);
    }


}